/*
 * 
 */
package SOEN_Phase_3;

import org.junit.*;
import static org.junit.Assert.*;

/**
 *
 * @author sandy
 * UNIT TEST
 */
public class TaskTableTest_EMPTY {
    
    public TaskTableTest_EMPTY() {
    }
    static TaskTable instance;
    @BeforeClass
    public static void setUpClass() throws Exception {
          instance = new TaskTable("");
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }
    @Before
    public void setUp() {
    }
    
    @After
    public void tearDown() {
    }
    
    /**
     * Test of initializeFromFile method, of class TaskTable.
     */
    @Test
    public void testInitializeFromFile() {
        System.out.println("initializeFromFile with nonexisting file");
        String taskTableFileName = "";        
        instance = new TaskTable(taskTableFileName);
        Object[] expResult = new Object[0];
        Object[] result = instance.getTasks();
        assertEquals(expResult, result);
    }

    /**
     * Test of getColumnCount method, of class TaskTable.
     */
    @Test
    public void testGetColumnCount() {
        System.out.println("getColumnCount from empty TaskTable");
        int expResult = 7;
        int result = instance.getColumnCount();
        assertEquals(expResult, result);
    }

    /**
     * Test of getRowCount method, of class TaskTable.
     */
    @Test
    public void testGetRowCount() {
        System.out.println("getRowCount");
        int expResult = 0;
        int result = instance.getRowCount();
        assertEquals(expResult, result);
    }

    /**
     * Test of getValueAt method, of class TaskTable.
     */
    @Test
    public void testGetValueAt() {
        System.out.println("getValueAt on empty TaskTable");
        int row = 0;
        int col = 0;
        Object expResult = null;
        Object result = instance.getValueAt(row, col);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of writeToTXT method, of class TaskTable.
     */
    @Test
    public void testWriteToTXT() {
        System.out.println("writeToTXT with invalid filename");
        String dir = "";
        String fName = "";
        instance.writeToTXT(dir, fName);
    }

    /**
     * Test of getTasks method, of class TaskTable.
     */
    @Test
    public void testGetTasks() {
        System.out.println("getTasks with empty task table");
        Object[] expResult = new Object[0];
        Object[] result = instance.getTasks();
        assertEquals(expResult, result);
    }

    /**
     * Test of getTaskByID method, of class TaskTable.
     */
    @Test
    public void testGetTaskByID() {
        System.out.println("getTaskByID non existant");
        int ID = 0;
        Task expResult = null;
        Task result = instance.getTaskByID(ID);
        assertEquals(expResult, result);
    }

    /**
     * Test of modifyTaskID method, of class TaskTable.
     */
    @Test
    public void testModifyTaskID() {
        System.out.println("modifyTaskID");
        int ID = 0;
        int newID = 0;
        boolean expResult = false;
        boolean result = instance.modifyTaskID(ID, newID);
        assertEquals(expResult, result);
    }

    /**
     * Test of modifyTaskTitle method, of class TaskTable.
     */
    @Test
    public void testModifyTaskTitle() {
        System.out.println("modifyTaskTitle");
        int ID = 0;
        String newTitle = "";
        instance.modifyTaskTitle(ID, newTitle);
    }

    /**
     * Test of modifyEstimatedDuration method, of class TaskTable.
     */
    @Test
    public void testModifyEstimatedDuration() {
        System.out.println("modifyEstimatedDuration");
        int ID = 0;
        int duration = 0;
        int expResult = 0;
        int result = instance.modifyEstimatedDuration(ID, duration);
        assertEquals(expResult, result);
    }

    /**
     * Test of modifyAssignee method, of class TaskTable.
     */
    @Test
    public void testModifyAssignee() {
        System.out.println("modifyAssignee");
        int ID = 0;
        String assigneeIDStr = "";
        instance.modifyAssignee(ID, assigneeIDStr);
    }

    /**
     * Test of modifyCompletion method, of class TaskTable.
     */
    @Test
    public void testModifyCompletion() {
        System.out.println("modifyCompletion");
        int ID = 0;
        boolean completion = false;
        instance.modifyCompletion(ID, completion);
    }

    /**
     * Test of modifyTimeInvested method, of class TaskTable.
     */
    @Test
    public void testModifyTimeInvested() {
        System.out.println("modifyTimeInvested");
        int ID = 0;
        int timeToAdd = 0;
        instance.modifyTimeInvested(ID, timeToAdd);
    }

    /**
     * Test of saveToXML method, of class TaskTable.
     */
    @Test
    public void testSaveToXML() {
        System.out.println("saveToXML with invali filename");
        String fname = "";
        instance.saveToXML(fname);
    }

    /**
     * Test of addNewTask method, of class TaskTable.
     */
    @Test
    public void testAddNewTask() {
        System.out.println("addNewTask");
        int ID = 0;
        String title = "";
        int duration = 0;
        int aID = 0;
        String aName = "";
        instance.addNewTask(ID, title, duration, aID, aName);
    }

    /**
     * Test of deleteTask method, of class TaskTable.
     */
    @Test
    public void testDeleteTask() {
        System.out.println("deleteTask");
        int ID = 0;
        Task expResult = null;
        Task result = instance.deleteTask(ID);
        assertEquals(expResult, result);
    }

    /**
     * Test of taskExists method, of class TaskTable.
     */
    @Test
    public void testTaskExists() {
        System.out.println("taskExists");
        int ID = 0;
        boolean expResult = false;
        boolean result = instance.taskExists(ID);
        assertEquals(expResult, result);
    }

    /**
     * Test of setValueAt method, of class TaskTable.
     */
    @Test
    public void testSetValueAt() {
        System.out.println("setValueAt");
        Object value = null;
        int row = 0;
        int col = 0;
        instance.setValueAt(value, row, col);
    }

    /**
     * Test of isCellEditable method, of class TaskTable.
     */
    @Test
    public void testIsCellEditable() {
        System.out.println("isCellEditable");
        int row = 0;
        int col = 0;
        boolean expResult = false;
        boolean result = instance.isCellEditable(row, col);
        assertEquals(expResult, result);
    }
}
